<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAppUserInfoTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('user_info', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->string('nickname', 10)->comment('用户昵称');
			$table->string('realname', 20)->nullable()->comment('真实姓名');
			$table->string('sign')->nullable()->comment('签名');
			$table->string('phone', 20)->nullable()->comment('手机号');
			$table->boolean('sex')->default(3)->comment('性别 1男 2女 3未知');
			$table->string('idcard', 20)->nullable()->comment('身份证号');
			$table->string('avatar')->nullable()->comment('头像');
			$table->string('openId', 100)->nullable()->comment('qq openid');
			$table->string('unionid',100)->nullable()->comment('qqUnionid');
			$table->string('password', 100)->nullable()->comment('登录密码');
			$table->boolean('status')->comment('状态 1正常 2已删除');
			$table->dateTime('first_login_time')->nullable()->comment('第一次登录时间');
			$table->dateTime('login_time')->nullable()->comment('当前登录时间');
			$table->dateTime('create_time')->nullable();
			$table->dateTime('update_time')->nullable();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('app_user_info');
	}

}
